package dimension.starry.constants;

import dimension.starry.item.typeInterface.ArmorType;

public class ArmorExp {

    public static final int[] needExp3 = new int[13];
    public static final int[] needExp4 = new int[17];
    public static final int[] needExp5 = new int[21];

    static {
        needExp3[0] = 1512;
        needExp3[1] = 1800;
        needExp3[2] = 2225;
        needExp3[3] = 2650;
        needExp3[4] = 3100;
        needExp3[5] = 3550;
        needExp3[6] = 4000;
        needExp3[7] = 4500;
        needExp3[8] = 5000;
        needExp3[9] = 5525;
        needExp3[10] = 6075;
        needExp3[11] = 6625;
        needExp3[12] = 7225;

        needExp4[0] = 1827;
        needExp4[1] = 2400;
        needExp4[2] = 2975;
        needExp4[3] = 3550;
        needExp4[4] = 4125;
        needExp4[5] = 4725;
        needExp4[6] = 5350;
        needExp4[7] = 6000;
        needExp4[8] = 6675;
        needExp4[9] = 7375;
        needExp4[10] = 8100;
        needExp4[11] = 8850;
        needExp4[12] = 9625;
        needExp4[13] = 10425;
        needExp4[14] = 12125;
        needExp4[15] = 14075;
        needExp4[16] = 16300;

        needExp5[0] = 2275;
        needExp5[1] = 3000;
        needExp5[2] = 3725;
        needExp5[3] = 4425;
        needExp5[4] = 5150;
        needExp5[5] = 5900;
        needExp5[6] = 6675;
        needExp5[7] = 7500;
        needExp5[8] = 8350;
        needExp5[9] = 9225;
        needExp5[10] = 10125;
        needExp5[11] = 11050;
        needExp5[12] = 12025;
        needExp5[13] = 13025;
        needExp5[14] = 15150;
        needExp5[15] = 17600;
        needExp5[16] = 20375;
        needExp5[17] = 23500;
        needExp5[18] = 27050;
        needExp5[19] = 31050;
        needExp5[20] = 35575;
    }

    public static int getNeedExp(ArmorType armorType, int currentLevel) {
        if (currentLevel >= 20) {
            return 99999999;
        } else if (armorType.getQuality().equals(ItemQuality.EXCELLENT)) {
            return needExp3[currentLevel + 1];
        } else if (armorType.getQuality().equals(ItemQuality.FINE)) {
            return needExp4[currentLevel + 1];
        } else if (armorType.getQuality().equals(ItemQuality.PERFECT)) {
            return needExp5[currentLevel + 1];
        }
        return 99999999;
    }

}
